package xx.shiro.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import xx.shiro.entity.SysRole;

import java.util.List;

/**
 * (SysRole)表数据库访问层
 *
 * @author halo-king
 * @since 2023-09-26 10:27:56
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    @Select(" select t1.* from sys_role t1 inner join sys_users_roles t2 on t1.id = t2.role_id where t2.user_id = #{id} ")
    List<SysRole> querySysRoleByUserId(Integer id);
}

